Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


Defining custom SmartLinks and events

In some cases, custom code added to SmartObjects must send an event from one SmartObject to another. If there is just one event type to send, you can define a dynamic SmartLink. To do this, add your own call to the addLink procedure at the appropriate place in your application code, and use the name of the event to be subscribed to, which must be the same as the internal procedure name to be executed when the event occurs. When addLink sees this reference to a link that is not in the SupportedLinks list for either the source or target object, it registers a single SUBSCRIBE statement for the target procedure for an event of the same name as the link and subscribes to the event in the source object. Because there is no predefined object property for the event and no get or set functions to manage the property value, a support procedure, called modifyUserLinks, stores the source and target handles in the ADM-DATA procedure attribute of the two objects so that the linkHandles function (described later) can return the object handles when they are requested. The exact format of the storage of these handles should not concern the developer. Always use the functions provided to get at these and other ADM values.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095